//
//  ShopBagEmptyView.m
//  ChunLaiZhuangClient
//
//  Created by xielihui on 16/4/19.
//  Copyright © 2016年 CLZ. All rights reserved.
//

#import "ShopBagEmptyView.h"
#import "HomeViewController.h"
#import "AppDelegate.h"
@interface ShopBagEmptyView()

@property (weak, nonatomic) IBOutlet UIButton *shoppingBtn;
@end

@implementation ShopBagEmptyView

- (id)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        UIView *view = [[[NSBundle mainBundle] loadNibNamed:@"ShopBagEmptyView" owner:self options:nil] firstObject];
        [self addSubview:view];
        [view mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.leading.trailing.equalTo(@(0));
        }];
        self.shoppingBtn.layer.cornerRadius = 8.f;
    }
    return self;
}
- (IBAction)shoppingAction:(id)sender {
    AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    UIButton *btn = [appDelegate.tabBarController.buttons objectAtIndex:0];
    [appDelegate.tabBarController selectedTab:btn];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
